Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms

Public Class FrmCrTheCongNo_NhaCungCap
    Private tenncc As String
    Private tungay As String
    Private denngay As String
    Private customerReport As ReportDocument

    Private Sub FrmCrTheCongNo_NhaCungCap_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        moduleUtils.setDinhDangVietNam()
        frmLoading.Show()
        Dim sqlQuery As String = "SELECT t1.*, t1.ma_chungtu as sohieu FROM tbl_dot_thecongno_nhacungcap as t1 "
        sqlQuery += "ORDER BY t1.ngay_chungtu,t1.ID"
        Dim reportPath = Application.StartupPath & "\" & "crTheCongNo_NhaCungCap.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("tungay", tungay)
        customerReport.SetParameterValue("denngay", denngay)
        customerReport.SetParameterValue("TTenncc", tenncc)
        customerReport.SetParameterValue("ketoantruong", globalVariale.KETOANTRUONG)
        customerReport.SetParameterValue("giamdoc", globalVariale.TONGGIAMDOC)
        Me.CrNXTTongHopview.ReportSource = customerReport
        frmLoading.Close()
        frmLoading.Dispose()
    End Sub

    Public Sub setTuNgay(ByVal s As String)
        tungay = s
    End Sub
    Public Sub setDenNgay(ByVal s As String)
        denngay = s
    End Sub

    Public Sub setTenncc(ByVal s As String)
        tenncc = s
    End Sub

End Class
